﻿<%@ Page Language="C#" ValidateRequest="false" AutoEventWireup="true" CodeBehind="TypeViewer.aspx.cs" Inherits="ServiceExplorer.TypeViewer" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>WSDL/XSD Complex Type Viewer</title>   
    <link media="all" href="style.css" type="text/css" rel="stylesheet" />
    <style type="text/css">
        .style1
        {
            font-family : Verdana;
            font-size: 8pt;
            width: 616px;
        }
        .style5
        {
            width: 199px;
        }
        .style6
        {
            width: 105px;
        }
        .style7
        {
            width: 97px;
        }
        .style10
        {
            width: 167px;
        }
        .style11
        {
            width: 170px;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <table>
    <tr>
    
    <td class="style1">
    <table>
    <tr>
    <td>
        <asp:FileUpload ID="FileUpload1" runat="server" 
            ToolTip="Browse a WSDL or XSD file to upload." />     
        
    </td>
    
    <td>
       <asp:Button ID="Button_Upload" runat="server" Text="Upload &amp; Parse " 
            CssClass="DataGridItem" 
            Width="99px" onclick="Button_Upload_Click"    
            ToolTip="Click it to upload WSDL or XSD file and  populate complex type names to drop-down list. Then pick from drop-down list to view type info" />  
           
    </td>
    <td>
    <asp:Label ID="Label_TypeHeader" runat="server"  Text ="Complex Types" CssClass="infomessage"></asp:Label>
    </td>
    <td>
      <asp:DropDownList ID="DropDownList_Object" runat="server" AutoPostBack="True" 
            onselectedindexchanged="DropDownList_Object_SelectedIndexChanged" 
            ToolTip="Select Complex Type from sorted name list to view type info.">
        </asp:DropDownList>
        </td>
          
    </tr>   
       
    </table>
    
  
            
            <table style="width: 801px">
            <tr>
            <td>
                 <asp:RadioButtonList ID="RadioButtonList_DocType" runat="server" 
            RepeatDirection="Horizontal" Enabled="False" CssClass="infomessage">
            <asp:ListItem>WSDL</asp:ListItem>
            <asp:ListItem>XSD</asp:ListItem>
        </asp:RadioButtonList>
            </td>
            
             <td class="style11">
                  <asp:CheckBox ID="CheckBox_WSDLDef" runat="server" AutoPostBack="True" 
                      CssClass="FormLabel" Text="WSDL Definition View" Checked="True" oncheckedchanged="CheckBox_WSDLDef_CheckedChanged" 
                        /> 
                 </td>  
                  
               <td class="style10">
                  <asp:CheckBox ID="CheckBox_TypeView" runat="server" AutoPostBack="True" 
                      CssClass="FormLabel" Text="Complex Type View" Checked="True" oncheckedchanged="CheckBox_TypeView_CheckedChanged" 
                        /> 
                 </td>      
             <td class="style7">
                  <asp:CheckBox ID="CheckBox_TextView" runat="server" AutoPostBack="True" 
                      CssClass="FormLabel" Text="Text View" Checked="True" 
                         oncheckedchanged="CheckBox_TextView_CheckedChanged" /> 
                 </td>   
           
    <td class="style6">
     <asp:CheckBox ID="CheckBox_TreeView" runat="server" AutoPostBack="True" 
                      CssClass="FormLabel" Text="Tree View" 
            oncheckedchanged="CheckBox_TreeView_CheckedChanged" />
    </td>
                 
                                   
            <td class="style5">
            
                  <asp:HyperLink ID="HyperLink1" runat="server" 
            NavigateUrl="mailto:serviceexplorer@gmail.com" 
            ToolTip="This is a lightweight handy tool to help your Complex Type analysis.">Email Your Feedback.</asp:HyperLink>
    </td>
            </tr>
           
            </table>

        
  
    
    <table>
    <tr>
    <td>
    <asp:GridView ID="GridView_WSDLDef" runat="server" BackColor="White" 
                    BorderColor="#3366CC" BorderStyle="Solid" BorderWidth="1px" 
        CellPadding="4" Height="100px" Width="451px" 
                    CssClass="DataGridItem" Caption="WSDL Definition" 
              AutoGenerateColumns="False" 
        >
                    <Columns>
                        <asp:TemplateField HeaderText="Element Name/XPath">
                            <EditItemTemplate> 
                                <asp:TextBox ID="TextBox6" runat="server" Text='<%# Eval("ElementName") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label6" runat="server" Text='<%# Eval("ElementName")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                           <asp:TemplateField HeaderText="Attribute Name">
                            <EditItemTemplate> 
                                <asp:TextBox ID="TextBox6" runat="server" Text='<%# Eval("AttributeName") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label6" runat="server" Text='<%# Eval("AttributeName")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                           <asp:TemplateField HeaderText="Attribute Value">
                            <EditItemTemplate> 
                                <asp:TextBox ID="TextBox6" runat="server" Text='<%# Eval("AttributeValue") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label6" runat="server" Text='<%# Eval("AttributeValue")%>'></asp:Label>
                            </ItemTemplate>
                             </asp:TemplateField>
                              
                            <asp:TemplateField HeaderText="Attribute Type">
                            <EditItemTemplate> 
                                <asp:TextBox ID="TextBox7" runat="server" Text='<%# Eval("AttributeType") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label7" runat="server" Text='<%# Eval("AttributeType")%>'></asp:Label>
                            </ItemTemplate>
                            
                        </asp:TemplateField>
                        
                       
                        
                    </Columns>
                    <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                    <RowStyle BackColor="White" ForeColor="#003399" />
                    <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                    <SelectedRowStyle BackColor="#FFFF99" Font-Bold="True" ForeColor="#009999" />
                    <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
                </asp:GridView>
    </td>
    </tr>
    <tr>
    <td>
        <asp:Label ID="Label_Info" runat="server" CssClass="infomessage"></asp:Label>
        <asp:Label ID="Label_FileName" runat="server" Visible="False"></asp:Label>
    </td>
    </tr>  
        <tr>
    <td>
        <asp:Label ID="Label_BaseInfo" runat="server" CssClass="infomessage" Visible="False"></asp:Label>
             <asp:LinkButton ID="LinkButton_BaseType" runat="server" 
            onclick="LinkButtonBaseType_Click" Visible="False"></asp:LinkButton>
   
    </td>
    </tr> 
    <tr>
      <td>
    <asp:GridView ID="GridView_ObjectField" runat="server" BackColor="White" 
                    BorderColor="#3366CC" BorderStyle="Solid" BorderWidth="1px" 
        CellPadding="4" Height="100px" Width="451px" 
                    CssClass="DataGridItem" Caption="Type Info" 
              AutoGenerateColumns="False" onrowdatabound="GridView_ObjectField_RowDataBound" onselectedindexchanged="GridView_ObjectField_SelectedIndexChanged" 
        >
                    <Columns>
                        <asp:TemplateField HeaderText="Field Name">
                            <EditItemTemplate> 
                                <asp:TextBox ID="TextBox1" runat="server" Text='<%# Eval("Name") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label1" runat="server" Text='<%# Eval("Name")%>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Field Type">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox2" runat="server" Text='<%# Eval("Type") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                      
                                <asp:LinkButton ID="LinkButton_Type" runat="server" Text='<%# Eval("Type") %>' 
                                    onclick="LinkButton_Type_Click"></asp:LinkButton>
                                                               
                                
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Min Occurs">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox3" runat="server" Text='<%# Eval("MinOccurs") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label3" runat="server" Text='<%# Eval("MinOccurs") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                          <asp:TemplateField HeaderText="Max Occurs">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox4" runat="server" Text='<%# Eval("MaxOccurs") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label4" runat="server" Text='<%# Eval("MaxOccurs") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                         <asp:TemplateField HeaderText="Inline_Documentation_from_Uploaded_Schema_File">
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox5" runat="server" Text='<%# Eval("Note") %>'></asp:TextBox>
                            </EditItemTemplate>
                            <ItemTemplate>
                                <asp:Label ID="Label5" runat="server" Text='<%# Eval("Note") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        
                    </Columns>
                    <FooterStyle BackColor="#99CCCC" ForeColor="#003399" />
                    <RowStyle BackColor="White" ForeColor="#003399" />
                    <PagerStyle BackColor="#99CCCC" ForeColor="#003399" HorizontalAlign="Left" />
                    <SelectedRowStyle BackColor="#FFFF99" Font-Bold="True" ForeColor="#009999" />
                    <HeaderStyle BackColor="#003399" Font-Bold="True" ForeColor="#CCCCFF" />
                </asp:GridView>
    </td>
    </tr>
    <tr>
    <td>
    
        <asp:TextBox ID="TextBox_XSD" runat="server" Height="452px" TextMode="MultiLine" 
               Width="704px" ReadOnly="True"></asp:TextBox>
      </td> 
   
    </tr>
    <tr>   
  	<TD vAlign="top" bgColor="#ffffff">
						<DIV style="WIDTH: 792px; POSITION: relative; HEIGHT: 404px"><iframe id="iFrame" style="BORDER-RIGHT: thin; BORDER-TOP: thin; Z-INDEX: 102; LEFT: 4px; BORDER-LEFT: thin; WIDTH: 769px; BORDER-BOTTOM: thin; POSITION: absolute; TOP: 5px; HEIGHT: 387px"
								name="iFrameSite" width="700" scrolling="auto" runat="server"></iframe>
						</DIV>
					</TD>  
         
    </tr>
    </table>
    
    </div>
    </form>
</body>
</html>
